USE [AnotherSuccessfulProcedure]

IF EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[dbo].[LogFilesSelectByName]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
BEGIN
	DROP PROCEDURE dbo.LogFilesSelectByName
END


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		Neil Wilson
-- Create date: 09/05/2008
-- Description:	Gets a log file record by id
-- =============================================
CREATE PROCEDURE LogFilesSelectByName 

	@LogName varchar(100)

AS
BEGIN

	SET NOCOUNT ON;

	SELECT [LogId]
		  ,[LogName]
		  ,[LogFileName]
		  ,[LogLocation]
		  ,[DateTime]
		  ,[MapId]
		  ,[RedFinalScore]
		  ,[BlueFinalScore]
		  ,[MatchStartTime]
		  ,[MatchEndTime]
		  ,[TotalMatchLength]
		  ,[LeagueId]
			
	FROM
		[AnotherSuccessfulProcedure].[dbo].[LogFiles]
	WHERE
		[LogName] = @LogName
END
GO
